import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Main',
      component: () => import('../components/home/Main'),
      children: [
        {
          path: '/',
          name: 'Show',
          component: () => import('../components/home/Show')
        },
        {
          path: '/proMessage',
          name: 'ProMessage',
          component: () => import('../components/home/ProMessage')
        },
        {
          path: '/cart',
          name: 'Cart',
          component: () => import('../components/order/Cart')
        },
        {
          path: '/verOrder',
          name: 'VerOrder',
          component: ()=> import('../components/order/VerOrder')
        },
        {
          path: '/order',
          name: 'Order',
          component: ()=> import('../components/order/Order')
        },
        {
          path: '/address',
          name: 'Address',
          component: ()=> import('../components/user/Address')
        },
        {
          path: '/personal',
          name: 'Personal',
          component: ()=> import('../components/user/Personal')
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component:()=> import('../components/user/index')
    }
  ]
})
